package www.baidu.ofo_bike;

import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.context.annotation.Bean;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.transaction.annotation.EnableTransactionManagement;


@SpringBootApplication
@EnableTransactionManagement
public class OfoBikeApplication {

	public static void main(String[] args) {
		SpringApplication.run(OfoBikeApplication.class, args);
	}

/**
   *@Author  Wangfa
   *@Data 2018/3/7 13:53
   *@Descript  配置fastjason覆盖jackson
*/
	@Bean
	public HttpMessageConverters httpMessageConverter(){
		FastJsonHttpMessageConverter fastJsonHttpMessageConverter=new FastJsonHttpMessageConverter();
		HttpMessageConverter<?> converter=fastJsonHttpMessageConverter;
		return  new HttpMessageConverters(converter);
	}
}
